import abc


class Buffer:
    def __init__(self):
        pass

    @abc.abstractmethod
    def sample(self, batch_size):
        pass

    @abc.abstractmethod
    def add(self, state, action, reward, next_state, done):
        raise NotImplementedError("该Buffer没有实现add方法")

    @abc.abstractmethod
    def size(self):
        pass
